home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 3 / Cream of the Crop 3.iso / utility / v_210a.zip / VIEW.DOC < prev    next >
Text File  |  1992-05-18  |  23KB  |  440 lines

  1.                        ┌────────────────────────────┐
  2.                        │          VIEW.EXE          │
  3.                        ╞════════════════════════════╡
  4.                        │  Programmed by Jim Wilson  │
  5.                        │Copyright(C) 90-92 * Ver 2.1│
  6.                        └────────────────────────────┘
  7.  
  8.  
  9.  
  10.     Stop,   hold  the  presses!  Major  story  breaking  -  View  has  been
  11.     rewritten!  Yep,  it's  true.  This little file viewer has had almost a
  12.     complete   rewrite,   all   for   the   sake  of  speed  and  increased
  13.     functionality.  I've  added  lots  of  features and enhanced it's value
  14.     tremendously  (at  least I think so). For example; there is no longer a
  15.     64K  file  size  limit - you  can  load files that are equal in size to
  16.     your  available  RAM  (minus what View itself needs, of course)  or 10,
  17.     000  lines,  whichever  comes first. There is no longer an 80 character
  18.     per  line  restriction - you  can read lines up to 250 characters wide.
  19.     Loading  files  from  disk  is also about 200% faster! For those of you
  20.     still  using  versions  1.0,  1.1,  and  1.1a  you might not notice the
  21.     changes  immediately  because  the  program  appears the same - but you
  22.     will, trust me.
  23.  
  24.  
  25.     If  all  this  sounds  kind  of dramatic for such a little program then
  26.     maybe  I  let  my  enthusiasm get the best of me. You see, I've spent a
  27.     great  deal  of  time  enhancing View, so read on and find out what I'm
  28.     talking about.
  29.  
  30.  
  31.  
  32.     ┌──────────────────────┐
  33.     │ GENERAL INFORMATION  │
  34.     └──────────────────────┘
  35.  
  36.     View  is  a  text  and ASCII file viewer. You can use View to read just
  37.     about  any  BAT,  DOC,  TXT,  or Read.Me type of file. It allows you to
  38.     read  a  file  with  up  to  10,000  lines, or as many as will fit into
  39.     your  RAM.  Each  line  can  contain  up  to  250 characters. What's so
  40.     special about that? I'm glad you asked!
  41.  
  42.  
  43.     There  are  a  million text file viewers floating around. Hell, you may
  44.     have  even  written one yourself. I've written three or four different,
  45.     but  somewhat  specialized,  viewers  over the years. If you have spent
  46.     more  than  2  seconds with any ShareWare or Public Domain software you
  47.     know  that  the  manual is usually a DOC file included on the diskette,
  48.     just  like  this  one.  There is almost always a Read.Me file with last
  49.     minute  changes  that  didn't  make the manual on time (most commercial
  50.     software  even  contains one). Some of these files can grow quite large
  51.     (I  saw  a  ShareWare  programmer's editor that had a DOC file that was
  52.     357K - too big to be loaded by the editor it came with!).
  53.  
  54.  
  55.     Your  only  available  choices for reading files of this type have been
  56.     either  a  file  viewer that could only read one 64K block of text at a
  57.     time  (one  memory  segment,  which  View use to be), one that tried to
  58.     read  the  entire  file  into RAM (which meant you usually had a viewer
  59.     with  a  big  EXE file or one that took a lot of RAM itself), your word
  60.     processor  (what  a lousy choice that is), or your text editor. If your
  61.     file  was  real  big  most viewers or word processors would not be able
  62.     to  load  the  entire  thing  so  they wouldn't load ANY of it. If your
  63.     lucky  the  text editor you use is able to "unload" the text that can't
  64.     fit in memory onto your hard drive like the one I use - Bingo.
  65.  
  66.  
  67.     Now,  just  because  you  have about 550K of available RAM doesn't mean
  68.     that  your  viewer  or  editor  could  load  a file that big - it needs
  69.     space  to  work  in  too.  Enter View. With View you can read any ASCII
  70.     text  file,  even ones that are over 450K! And if the file is too large
  71.     for  RAM  View  doesn't just say "sorry pal, it's too big for me so I'm
  72.     going  to  exit  to DOS" (which a lot of programs do!), it will display
  73.     what it could read.
  74.  
  75.  
  76.     In  short,  Views  combination  of speed, features, and small size make
  77.     it  the  ideal  choice for almost anybody. Because the EXE file is only
  78.     9,459  bytes  you  can  carry  it  anywhere.  And  since  all the major
  79.     movement  commands  are  present (Arrows, PgUp, PgDn, Home, End, etc..)
  80.     you're   not  sacrificing  features  for  portability  or  speed.  This
  81.     program  has  been  carefully crafted to use as little of your precious
  82.     RAM as possible, so there's more available for your file.
  83.  
  84.  
  85.  
  86.     ┌──────────────────────┐
  87.     │ PROGRAM INFORMATION  │
  88.     └──────────────────────┘
  89.  
  90.     View  uses  only  about  59K of RAM for itself. This means that you can
  91.     use  it  on  virtually  any  PC.  (If  you  don't  have  that  much RAM
  92.     available  your  in the wrong business!) Essentially what this means is
  93.     that  all  the  remaining conventional (base) memory in your system can
  94.     be  used  for  file  storage.  For example; if, after having loaded all
  95.     your  device  drivers  and TSR's you have 560K of RAM free (as reported
  96.     by  chkdsk  or  some  similar  program), then you would be able to load
  97.     and  read  any  ASCII  text  file  up  to about 500K (or 10,000 lines)!
  98.     Not too bad from an EXE file of only 9,459 bytes!
  99.  
  100.  
  101.     View  starts  by verifying that the file you want to read exists. If it
  102.     does  View  then  verifies  that  the file actually contains data (some
  103.     programs  will  attempt to read a file with 0 bytes of data). View then
  104.     checks  to  see  that  you have at least 75K of free RAM. If everything
  105.     is  good  up  to  this  point  View then loads itself into memory. Once
  106.     loaded,  it  proceeds  to  set  up  10,000 5 byte pointers for the data
  107.     structure  (each  one  will contain a line number and the string length
  108.     for  the  data  it  is about to read). After the pointers have been set
  109.     up  View  then  starts  reading  until  it reaches the end of the file,
  110.     runs  out  of  RAM,  or until it has read 10,000 lines (this limit will
  111.     be explained later).
  112.  
  113.  
  114.     Once  the  file  has been loaded you can use the up, down, left, right,
  115.     ctrl-left  and  ctrl-right arrows, along with the PgUp, PgDn, Home, and
  116.     End  keys  to  move  around.  If  you  hit  a wrong key or if you hit a
  117.     "limit", like  hitting  PgDn  when  your  on  the last page already the
  118.     program gives a very gentle beep (not the annoying kind!).
  119.  
  120.  
  121.     I've   spent  a  considerable  amount  of  time  fine  tuning  the  RAM
  122.     requirements  for  View. With all the tweaking that was done I probably
  123.     gave  View  the  ability  to read a file that was 25K - 30K bigger then
  124.     when  I  first  wrote  the  new memory scheme. That may not seem like a
  125.     lot  in  todays world of multi-megabyte systems, but when you only have
  126.     640K  of  RAM for DOS all of the sudden 30K seems like a lot. Even with
  127.     that  I  was  able  to  give  the  program  a few extra features like a
  128.     status  line  at  the  bottom  of the screen which contains the name of
  129.     the  file  you're  viewing,  the  current  line  number,  the last line
  130.     number   in  the  file,  and  the  right  column  position.  I've  also
  131.     incorporated  direct  video  writes  (which  required  a  procedure  to
  132.     determine  what  type of monitor you have), pretty good error checking,
  133.     a  goto  line number feature, and even a brightness control for laptops
  134.     or  PC's  with  crappy  contrast  (does your present file viewer have a
  135.     brightness control as a feature?).
  136.  
  137.  
  138.  
  139.     ┌────────────┐
  140.     │ RAM USAGE  │
  141.     └────────────┘
  142.  
  143.     OK,  enough  of  the  propaganda,  now  let's get serious. The RAM that
  144.     View uses is broken down as follows:
  145.  
  146.            50K - 10,000 5 byte data pointers.
  147.             4K - Error checking and all status information
  148.             5K - Video writes, keyboard routines, associated "housekeeping"
  149.          =====
  150.            59K - Total RAM used by View.Exe (approximately)
  151.  
  152.     Not  too  bad,  huh?  The  EXE  file is only 9, 459 bytes, which is 541
  153.     bytes  less  then  my  maximum target of 10, 000. It will work with ANY
  154.     type  of  monitor, be it monochrome, CGA, EGA, VGA, LCD, Gas Plasma, or
  155.     whatever  you  happen to have. As a matter of fact, the procedure which
  156.     determines  what  type of monitor you have is so accurate that you will
  157.     probably  never  have  to  use  the  /M  command  line option, which is
  158.     discussed  a  little  later  in this document. The video writes and the
  159.     keyboard  handler  were  written  in assembler for the fastest possible
  160.     performance on any computer.
  161.  
  162.  
  163.  
  164.     ┌────────────────┐
  165.     │ KEYBOARD USAGE │
  166.     └────────────────┘
  167.  
  168.     The  keys  that View uses are all pretty self-explanatory (hell, if you
  169.     made  it  this far in the documentation you figured out how to use most
  170.     of them already). Here's a listing of them, anyway.
  171.  
  172.     LeftArrow  - Moves the data on the screen 5 columns to the left
  173.     RightArrow - Moves the data on the screen 5 columns to the right
  174.     UpArrow    - Moves back to the previous line of data
  175.     DownArrow  - Moves down to the next line of data
  176.     PgUp       - Moves back to the previous 24 lines of data (1 page)
  177.     PgDn       - Moves down to the next 24 lines of data (1 page)
  178.     Home       - Goes to the first line of the file
  179.     End        - Goes to the last line of the file
  180.     CtrlLeft   - Moves the data 40 columns to the left
  181.     CtrlRight  - Moves the data 40 columns to the right
  182.     B or b     - Toggle: turns the brightness of the data up or down
  183.     G or g     - Goto a specific line number
  184.     ESC        - Exits View
  185.  
  186.  
  187.     NOTE:  When  using  the  'G'oto  function the line number you specified
  188.     will  be  placed directly above the status line. If you select a number
  189.     less  then  24  then  View will display the first page of data from the
  190.     file.  If  you specify an invalid line number then View will just beep.
  191.     If  you  decide  that the number you entered is not correct you can hit
  192.     the  BACKSPACE  key  to  erase  it.  If  you  decide against using this
  193.     function at all you can hit the ESC key to cancel.
  194.  
  195.  
  196.     Another  bit  of  information that might make you understand the status
  197.     line  a  little  better;  the Col:## is the right most column currently
  198.     being  viewed  while  the  Line:##  is  the  last line displayed on the
  199.     screen.  This  makes the numbers you see always the extremes - the last
  200.     line and the last column of that particular screen.
  201.  
  202.  
  203.  
  204.     ┌─────────────────┐
  205.     │ PROGRAM OPTIONS │
  206.     └─────────────────┘
  207.  
  208.     View supports only three command line options, which are:
  209.  
  210.              /? or /H - A small help screen
  211.                    /M - Forced monochrome mode
  212.          Filename.Ext - Name of the file to view
  213.  
  214.     Options  can  be  entered  in any order and you can use either upper or
  215.     lower  case  letters,  but  you  must leave a space between each option
  216.     selected.  All  unrecognized commands are ignored. One option causes an
  217.     immediate  response - /?  (or  /H).  This  instructs  View to print the
  218.     help  screen  and  then  return  to DOS. This option will be acted upon
  219.     REGARDLESS  of  where  it's  placed  on  the command line. If you don't
  220.     specify  a  file  name  you will get the help screen to remind you what
  221.     to do. The definition of the available options is:
  222.  
  223.     /? or /H - Use  this  option to get a help screen that looks similar to
  224.                the  one above. If no file name is given on the command line
  225.                then View will print this Help screen as a reminder.
  226.  
  227.           /M - By default View displays white text on a blue background. On
  228.                most  systems  this  doesn't  present a problem. However, on
  229.                certain   laptops,  portables,  and  monochrome  EGA  or VGA
  230.                monitors  this  can be difficult to read. Use this option to
  231.                instruct  View  to  display  white  characters  on  a  black
  232.                background.  The  'B'rightness  command  will recognize your
  233.                selected color choice and will work accordingly.
  234.  
  235.     Filename - The  name  of the file you would like to view. Drive letters
  236.                and paths are fully supported.
  237.  
  238.  
  239.  
  240.     ┌─────────────────┐
  241.     │ VERSION HISTORY │
  242.     └─────────────────┘
  243.  
  244.     1.0 - Initial  release  to  the  general  public.  Only  used by myself
  245.    6/91   prior to that.
  246.  
  247.  
  248.     1.1 - Added  the  /I  option to ignore blank lines. Added the /S option
  249.    8/91   to  check  the  file  size  in  lines. Fixed a bug with the error
  250.           checking  routine. Fixed a bug when you had a file with less than
  251.           24  lines  (1  full  page)  of text. Fixed a bug with the monitor
  252.           checking procedure.
  253.  
  254.  
  255.     1.1a- Fixed  a  bug  with  file  names that started with a number, like
  256.    10/91  4DOS.DOC.  View  mistook  that  for  a  'start  at  line  number'
  257.           command (similar to the /##### option).
  258.  
  259.  
  260.     2.0 - Major  rewrite!  Removed  the  /#####  (start at line number), /I
  261.    3/92   (ignore  blank  lines),  and  the  /S (show size of file) options
  262.           because  they  are no longer necessary - they existed strictly to
  263.           make  the  64K  file  size  limit  a  little more bearable. Added
  264.           support  for  the left and right arrow keys, the 'B'rightness and
  265.           the  'G'oto  line  number functions as well as being able to load
  266.           files  up  to the maximum size of your free RAM. All this and the
  267.           EXE file is only 1.1K larger!
  268.  
  269.  
  270.     2.1 - Added  the  ctrl_left  and  ctrl_right  arrow  keys to scroll the
  271.    5/92   screen  40  columns  to  the  left/right,  respectively.  Fixed a
  272.           memory  allocation  error where View was loading 1 line less then
  273.           it  said  it  was if your file was either 10,000 lines long or it
  274.           used  up  all  the RAM in your system before the end of the file.
  275.           Added  some  color  to  the  display,  for those of us with color
  276.           monitors.  Fixed  a  bug  with  the  'G'oto  command  if the user
  277.           entered  a  number  larger  then the total number of lines in the
  278.           file.  Performed  some  general "housekeeping" on the source code
  279.           for  the  sake of speed and/or size. All this and the EXE file is
  280.           now  148  bytes  smaller than version 2.0! Yeah I know, 148 bytes
  281.           ain't  much - but how  many times have you seen a program updated
  282.           with  new  features  and  bug  fixes that actually got smaller in
  283.           size?
  284.  
  285.  
  286.     2.1a- Fixed  a  keyboard  handler  problem  where  the  keyboard  would
  287.     5/92  respond  sluggishly,  if  at  all,  when the file you loaded took
  288.           all available RAM and you had the TSR SuperKey loaded.
  289.  
  290.  
  291.     ┌──────────────────┐
  292.     │ FINAL RAMBLINGS  │
  293.     └──────────────────┘
  294.  
  295.     Some last words of wisdom (or at least as close as I can come).
  296.  
  297.  
  298.     As  with  all Public Domain programs I take no responsibility for View.
  299.     If  it  blows  up  in  your  face then it's your fault, not mine. It if
  300.     melts  your  hard drive, then so be it. If it makes you wish you were a
  301.     Vulcan  (for  all  you  Star  Trek  fans) then "live long and prosper".
  302.     Actually,   I  get  pretty  fed  up  with  the  legal  crappola  that's
  303.     necessary  in  todays world. Of course my program won't blow up in your
  304.     face  or  melt your hard drive - I'm being sarcastic and ridiculing the
  305.     legal  establishment!  I  use  View  every  day and I have yet to see a
  306.     Vulcan (prior to consuming larger quantities of Becks, that is).
  307.  
  308.  
  309.     View  has  a  "big"  brother  called ReadIt. Yes, that's right - if you
  310.     like  View  but  want  something a little more powerful I can certainly
  311.     help  you  out.  You  see,  View  is  kinda  like my "test bed" for new
  312.     ideas.  It's  also something I happen to give away for free because I'm
  313.     a  nice  guy!  ReadIt  is my ShareWare program, the one you have to pay
  314.     for.  Both  View and ReadIt share the same basic "engine" (file access,
  315.     error  handling,  keyboard reading, and video writes). ReadIt, however,
  316.     includes  online  help,  text  search  (case  sensitive or not), a file
  317.     information   window,  monochrome  or  color  palette  selection,  user
  318.     selectable  TAB  expansion,  and  the  ability to print any part of the
  319.     file  with  automatic  or manual form feeding and line widths up to 250
  320.     characters.  This  is  all  wrapped  up in an interface featuring popup
  321.     windows  with  shadows  and an EXE file size of only about 16K! If this
  322.     sounds  good  to you then send just $10.00 dollars to me at the address
  323.     at  the  end of this DOC file, along with a letter containing your name
  324.     and address, and I'll rush a copy of ReadIt out to you.
  325.  
  326.  
  327.     You've  probably  noticed  that  I have given View a 10,000 line limit.
  328.     This  file  size  limit is because I'm trying to get you to buy ReadIt,
  329.     which   has  limit  of  almost  16,000  lines - that's  more  then  50%
  330.     greater  then  View!  Why  does  ReadIt have such a limit at all? Well,
  331.     it's  not  because  of  me  really - it's Borland. For some reason they
  332.     set  a  limit  on the size of a data structure you can create when your
  333.     allocating  RAM  from  the  heap.  I don't know if Turbo C suffers from
  334.     the  same  restriction  as  Turbo  Pascal,  which  View and ReadIt were
  335.     written  in.  If it were up to me I would have ReadIt use all available
  336.     RAM, regardless of the number of lines.
  337.  
  338.  
  339.     If  you  happen to be one of the few unfortunate souls who still have a
  340.     CGA  monitor  you had better be prepared for a "blizzard" of snow. View
  341.     writes  directly  to  video  RAM  and  I didn't program any routines to
  342.     perform  the  necessary  synchronization  for the video retrace signal.
  343.     On all other types of monitors there will be no problems.
  344.  
  345.  
  346.     View  works  exclusively  in  read  only  mode.  What exactly does that
  347.     mean?  Well,  it  means  you  can  read  ANY  file,  regardless  of its
  348.     attributes  (hidden,  system,  readonly)  or  its  type (DOC, TXT, HLP,
  349.     etc).  View  doesn't  create  any  temporary files for data storage nor
  350.     does it alter the original so you can use it without concern.
  351.  
  352.  
  353.     From  time  to  time  you  might see some strange symbols appear on the
  354.     screen.  This  is  the  way  View  prints  the  TAB  (ASCII  code 009),
  355.     FORMFEED  (ASCII  code  012),  and  a few other "difficult" characters.
  356.     View  doesn't  have routine to expand TAB's into spaces. Very few files
  357.     are  saved with TAB's anyway, so this shouldn't be a problem. If it is,
  358.     then  get  a  hold  of  ReadIt  which  does  have  TAB  expansion as an
  359.     option.
  360.  
  361.  
  362.     The  three  areas  I've concentrated on the most when writing View were
  363.     file   reading,  video  writes,  and  memory  allocation.  These  three
  364.     functions  were  tweaked  and tweaked till they screamed. Consequently,
  365.     they  are  the areas that work the fastest and consume the least amount
  366.     of memory (as it should be).
  367.  
  368.  
  369.  
  370.     ┌──────────────┐
  371.     │ WHAT'S NEXT? │
  372.     └──────────────┘
  373.  
  374.     What's  next  for View? Well, I'm not really sure. My main objective is
  375.     to  keep  the  program  small  and  fast  - that design goal will never
  376.     change.  However,  I'm  not  going  to  ignore a good suggestion for an
  377.     enhancement  if  you've  got  one.  Want a neat new feature added? Then
  378.     drop  me  a  line  at the address below and I'll check into it. Some of
  379.     the  things  I'm  contemplating  are:  a  search  or  find  function, a
  380.     "bookmark"  or  place  holder  to  mark  a  spot in the file so you can
  381.     easily  jump  back to it later, and maybe the the ability to use EMS or
  382.     XMS memory for data storage.
  383.  
  384.  
  385.  
  386.     ┌──────────────┐
  387.     │ REGISTRATION │
  388.     └──────────────┘
  389.  
  390.     Why  is  this  part of View.Doc last? Because it's the least important,
  391.     that's why! I don't believe in a lot of legal rhetoric.
  392.  
  393.  
  394.     VIEW  IS  A  PUBLIC DOMAIN PROGRAM. YOU ARE FREE TO USE IT FOR YOUR OWN
  395.     *PERSONAL*  USE.  YOU  ARE  ENCOURAGED  TO  GIVE  IT AWAY TO ANYONE AND
  396.     EVERYONE WHO WANTS IT (except as noted below).
  397.  
  398.  
  399.     The only real restrictions I impose are:
  400.  
  401.     1. Whomever  you  give  this  program  to,  whether  you copy it onto a
  402.        diskette,  a  hard drive, or you upload it to a BBS, *MUST* be given
  403.        the  complete  set  of  files (at this writing they are View.Exe and
  404.        View.Doc).
  405.  
  406.     2. None  of  the  files  (View.Exe  or  View.Doc) may be altered in any
  407.        fashion and must remain in their ORIGINAL form. NO EXCEPTIONS!
  408.  
  409.     3. You  CANNOT,   under  ANY  circumstance,   use  this  program  in  a
  410.        commercial,  retail,  promotional,  or other similar fashion without
  411.        the expressed written consent of the author.
  412.  
  413.     4. You  CANNOT,  under  ANY  circumstance,  use  this program to make a
  414.        profit.  This  includes  distributing  it  with  your  own software,
  415.        selling  it,  "renting"  it,  or any other such arrangement that you
  416.        obtain reimbursement for.
  417.  
  418.     If  you  do desire to distribute View with your ShareWare catalog, your
  419.     commercial  software,  or  for  any other non-personal endeavor, please
  420.     write  to  me  at  the  address  below.  I  would be more then happy to
  421.     license  View  to  just about anybody. Remember, it's entirely free for
  422.     personal use!
  423.  
  424.  
  425.     If  you  would  like  to  be  kept  abreast  of  any  new  developments
  426.     concerning  View  then  send  me a buck (one thin dollar!) and I'll add
  427.     your  name  to  the  mailing  list.  Make sure you tell me what version
  428.     your  using.  If  you  would like me to automatically send you the next
  429.     version  then  send  me  five bucks. Even if you don't send a buck (you
  430.     cheap  skate)  feel  free  to  drop  me a note and let me know what you
  431.     think about View, especially if you've found a bug (God forbid!).
  432.  
  433.  
  434.  
  435.                           ╓────────────────────────╖
  436.                           ║       Jim Wilson       ║
  437.                           ║      9 Miller Ave      ║
  438.                           ║  Washington, NJ 07882  ║
  439.                           ╙────────────────────────╜
  440.